#!/usr/local/bin/perl -w
use strict;
use utf8;
use lib '../lib';

use NG::Sys::App qw(
NG::Sys::Loop::Cgi
NG::Test::Test
);

use Data::Dumper;
my $app = new NG::Sys::App;
my $t = app->template_tt->read("w1");

$app->run;

sub cmd_test {
	my ($app,$form,$obj) = @_;
	$app->do_action($form,["default"]);
}

sub cmd_default {
	my ($app,$form,$obj) = @_;
	$form->{data}{obj} = $obj;
	$form->{data}{title} ||= " по умолчанию";
	$form->process($t);
}
